﻿using DemoGo;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 五子棋
{
    public partial class FormMain : Form
    {
        //游戏对象说明
        private Game _game;
        public FormMain()
        {
            InitializeComponent();
        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void FormMain_Load(object sender, EventArgs e) =>
            //初始化游戏类
            _game = new Game();

        private void gameArea_Paint(object sender, PaintEventArgs e)
        {
            if (_game !=null ) //游戏已经初始化了
            {
                _game.Draw(e.Graphics,this.gameArea.Size);
            }
        }
    }
}
